﻿@model PagedList<YiYiTong.Rocket.Entity.LoginLog>
@{
    ViewBag.Title = "登录日志";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<form id="S_Form" class="form-inline definewidth m20" action="@Url.Action("LoginLogList", "User")" method="get">
    <p>
        用户名：
        <input type="text" name="loginName" id="loginName" class="abc input-default" placeholder="" value="@Request.QueryString["loginName"]">&nbsp;
        登录时间：
        <input type="text" name="begTime" class="calendar" id="begTime" value="@Request.QueryString["begTime"]"> - <input type="text" name="endTime" class="calendar" id="endTime" value="@Request.QueryString["endTime"]">&nbsp;
        <button type="submit" class="btn btn-primary">查询</button>
    </p>
</form>
<table class="table table-bordered table-hover definewidth m10">
    <thead>
        <tr>
            <th>日志编号</th>
            <th>用户编号</th>
            <th>用户名</th>
            <th>登录时间</th>
            <th>登录IP</th>
            <th>登陆描述</th>
            <th>备注</th>
        </tr>
    </thead>
    @if (Model != null && Model.Count != 0)
    {
        foreach (var m in Model)
        {
            <tr>
                <td>@m.id</td>
                <td>@m.uid</td>
                <td>@m.loginName</td>
                <td>@m.loginTime.ToString("yyyy-MM-dd")</td>
                <td>@m.loginIp</td>
                <td>@m.loginDescription</td>
                <td>@m.remark</td>
            </tr>
        }
    }
</table>
<div class="inline pull-right page">
    @if (Model != null)
    {
        @Html.Pager(Model, new PagerOptions { ContainerTagName = "div", PagerItemTemplate = "{0}", CurrentPagerItemTemplate = "<span class='current'>{0}</span>", DisabledPagerItemTemplate = "<span class=\"disabled\">{0}</span>", Id = "flickrpager" })
    }
</div>
<script>
    BUI.use('bui/form', function (Form) {
        new Form.Form({
            srcNode: '#S_Form'
        }).render();
    });
</script>
